package com.qd.common.panda.domain.entity.space.publish;

import com.cdqidi.util.page.BaseQuery;
import com.cdqidi.valid.group.DefaultGroup;
import com.cdqidi.valid.group.DeleteGroup;
import com.cdqidi.valid.group.UpdateGroup;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;

/**
 * 发布车位租赁
 *
 * @author sjk
 */
@EqualsAndHashCode(callSuper = true)
@Getter
@Setter
public class ParkSpacePublishDTO extends BaseQuery {

    /**
     * 主键
     */
    @NotBlank(message = "车位发布ID不能为空", groups = {DeleteGroup.class, UpdateGroup.class})
    @Size(max = 50, message = "车位发布ID长度不能超过{max}位", groups = {DeleteGroup.class, UpdateGroup.class})
    private String publishId;
    /**
     * 标题
     */
    @NotBlank(message = "标题不能为空", groups = DefaultGroup.class)
    @Size(max = 200, message = "标题长度不能超过{max}位", groups = DefaultGroup.class)
    private String title;
    /**
     * 租赁开始时间
     */
    private String startDate;
    /**
     * 租赁结束时间
     */
    private String endDate;
    /**
     * 租赁开始小时
     */
    private String startHour;
    /**
     * 租赁结束小时
     */
    private String endHour;
    /**
     * 租赁天数:租赁天数、小时数
     */
    private Long days;
    /**
     * 发布时间
     */
    private LocalDateTime publishTime;
    /**
     * 备注
     */
    @Size(max = 200, message = "备注长度不能超过{max}位", groups = DefaultGroup.class)
    private String note;
    /**
     * 停车场ID
     */
    @NotBlank(message = "停车场不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "停车场长度不能超过{max}位", groups = DefaultGroup.class)
    private String parkId;
    /**
     * 停车产ID显示
     */
    private String parkIdDisplay;
    /**
     * 车位类型
     */
    @Size(max = 50, message = "车位类型长度不能超过{max}位", groups = DefaultGroup.class)
    private String parkSpaceType;
    /**
     * 车位类型显示
     */
    private String parkSpaceTypeDisplay;
    /**
     * 是否启用
     */
    @Size(max = 50, message = "是否启用长度不能超过{max}位", groups = DefaultGroup.class)
    private String enable;
    /**
     * 是否启用显示
     */
    private String enableDisplay;
    /**
     * 租赁类型
     */
    @NotBlank(message = "租赁类型不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "租赁类型长度不能超过{max}位", groups = DefaultGroup.class)
    private String leaseType;
    /**
     * 租赁类型显示
     */
    private String leaseTypeDisplay;
    /**
     * 循环发布
     */
    @NotBlank(message = "循环发布不能为空", groups = DefaultGroup.class)
    @Size(max = 50, message = "循环发布长度不能超过{max}位", groups = DefaultGroup.class)
    private String loopPublish;
    /**
     * 循环发布显示
     */
    private String loopPublishDisplay;
    /**
     * 操作人
     */
    @Size(max = 50, message = "操作人长度不能超过{max}位", groups = DefaultGroup.class)
    private String operator;
    /**
     * 操作人显示
     */
    private String operatorDisplay;
    /**
     * 机构ID
     */
    @Size(max = 50, message = "机构ID长度不能超过{max}位", groups = DefaultGroup.class)
    private String orgId;
    /**
     * 机构ID显示
     */
    private String orgIdDisplay;


    @Override
    public void freeData() {
        this.publishId = null;
        this.title = null;
        this.startDate = null;
        this.endDate = null;
        this.startHour = null;
        this.endHour = null;
        this.days = null;
        this.publishTime = null;
        this.note = null;
        this.parkId = null;
        this.parkIdDisplay = null;
        this.parkSpaceType = null;
        this.parkSpaceTypeDisplay = null;
        this.enable = null;
        this.enableDisplay = null;
        this.leaseType = null;
        this.leaseTypeDisplay = null;
        this.loopPublish = null;
        this.loopPublishDisplay = null;
        this.operator = null;
        this.operatorDisplay = null;
        this.orgId = null;
        this.orgIdDisplay = null;
        super.freeData();
    }
}
